﻿<%@ Page Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %>

<asp:Content ID="changePasswordTitle" ContentPlaceHolderID="TitleContent" runat="server">
    <title>Change Password</title>
    <meta name="description" content="icomplain change password" />
    <meta name="keywords" content="complain,icomplain,change password" />
</asp:Content>
<asp:Content ID="changePasswordContent" ContentPlaceHolderID="MainContent" runat="server">

    <script src="../../Scripts/Complaint/Views.Account.ChangePassword.js" type="text/javascript"></script>

    <h2>
        Change Password</h2>
    <p>
        Use the form below to change your password.
    </p>
    <%= Html.ValidationSummary("Password change was unsuccessful. Please correct the errors and try again.")%>
    <% using (Html.BeginForm())
       { %>
    <div>
        <fieldset>
            <legend>Account Information</legend>
            <p>
                <label for="currentPassword">
                    Current password:</label>
                <%= Html.Password("currentPassword") %>
                <%= Html.ValidationMessage("currentPassword") %>
            </p>
            <p>
                <label for="newPassword">
                    New password:</label>
                <%= Html.Password("newPassword", null, new { maxlength = 20 }) %>
                <span>New passwords are required to be a minimum of
                    <%=Html.Encode(Complaint.Models.Dtos.User.MinRequiredPasswordLength)%>
                    characters in length.</span>
                <%= Html.ValidationMessage("newPassword") %>
            </p>
            <p>
                <label for="confirmPassword">
                    Confirm new password:</label>
                <%= Html.Password("confirmPassword", null, new { maxlength = 20 })%>
                <%= Html.ValidationMessage("confirmPassword") %>
            </p>
            <p>
                <button id="save" class="formbutton">
                    Change Password</button>
                <button id="cancel" class="formbutton">
                    Cancel</button>
            </p>
        </fieldset>
    </div>
    <% } %>
</asp:Content>
